﻿
Partial Class _Default
    Inherits System.Web.UI.Page

    Private Sub MAJInfo()
        Dim survey As New surveillance.logsurvey
        survey.Timeout = 60000
        survey.Url = Application("LogAdresse")
        Try
            LabelNbLog.Text = CStr(survey.NbLog) + " logs actifs"
        Catch ex As Exception
            LabelNbLog.Text = "Res@Logs Erreur Calcul"
        End Try
        '-----------------
        Dim dbUser As New LogDataSetTableAdapters.user_detailTableAdapter
        Dim data As New LogDataSet.user_detailDataTable
        data = dbUser.GetData
        LabelNbUser.Text = CStr(data.Count) + " abonnés"
    End Sub

    Protected Sub GridViewUser_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridViewUser.SelectedIndexChanged
        Dim indexvrai As Integer
        If GridViewUser.PageIndex = 0 Then
            indexvrai = GridViewUser.SelectedIndex
        Else
            indexvrai = GridViewUser.PageIndex * 8 + GridViewUser.SelectedIndex
        End If
        FormViewUser.PageIndex = indexvrai
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Session("droit") <> "ADM" Then Response.Redirect("identification.aspx")
        HyperLinkLog.NavigateUrl = Application("GestionLog")
        HyperLinkFMXML.NavigateUrl = Application("GestionFMXML")
        HyperLinkFIXML.NavigateUrl = Application("GestionFIXML")
    End Sub

    Protected Sub BtnInfo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnInfo.Click
        MAJInfo()
    End Sub
End Class
